home *** CD-ROM | disk | FTP | other *** search
- *****Listing 3*****
-
- #include <stdio.h>
-
- extern int text_height;
-
- /**************************************************
- * lj_outtextxy() - output string to laser printer
- *
- * Parameters:
- * x (in) - x position in dots.
- * y (in) - y position in dots.
- * string (in) - string to output
- *
- * Global:
- * text_height - height of text characters.
- *
- * Notes:
- * 1. Compiled with Turbo C version 2.0
- * 2. x,y = 0,0 is upper left corner of page
- *
- * History:
- * Original code by William H. Roetzheim, 1990
- ***************************************************/
-
-
- void lj_outtextxy(int x, int y, char *string)
- {
- /* adjust y position */
- y += text_height;
-
- /* move cursor to new position */
- fprintf(stdprn, "\033*p%dx%dY", x, y);
-
- /* output string */
- fprintf(stdprn, string);
- }
-